package per.xue.carid_booking;

import per.xue.carid_booking.dto.CarMapperDTO;
import per.xue.carid_booking.entity.Car;

import java.lang.reflect.InvocationTargetException;
import java.util.Date;
import java.util.List;

/**
 * @auther zhang
 * @ TO DO
 * @creatTime 2021/5/23 14:35
 **/
public class test {

   /* public static void main(String[] args) {
        *//*Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        Date date = calendar.getTime();
        *//**//*Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);*//**//*
        //把日期往后增加一天.整数往后推,负数往前移动
        calendar.add(calendar.DATE,1);

        //这个时间就是日期往后推一天的结果
        date=calendar.getTime();

        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
        String tomorrowStr = formatter.format(date);
        //String newStr = formatter.format(date);
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
        String newStr = format.format(new Date());
        tomorrowStr = format.format(date);
        System.out.println("new:"+newStr);
        System.out.println("tomorrow"+tomorrowStr);*//*


        //获取明天零点的时间
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.add(calendar.DATE,1);
        Date date = calendar.getTime();

        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
        String newStr = format.format(new Date());
        String tomorrowStr = format.format(date);
        System.out.println("new:"+newStr);
        System.out.println("tomorrow"+tomorrowStr);

    }*/

    public static void main(String[] args) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
        Car car = new Car();
        car.setTime(new Date());
        System.out.println(new CarMapperDTO(car, new Date(), new Date()));
        List<Car> result = null;
        result.add(car);
    }
}
